<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
	<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>

	<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
	<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/workspace.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" /> 
	<title>后台管理</title>
</head>

<body class="body_ifm">
	
	<form action="index.php?m=admin_message&c=show" method="post" id='checkform' >
		<input type="hidden" name="userid" id="userid" value="">
		<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
	</form>
	 
	<div class="infoboxp">
		<div class="tabs_info" style="height:36px;">
           	<ul>
	            <li class="curr">
	                <a href="###">业务统计</a>
	         	</li>
           	</ul>	
       	</div>
		<div class="crm_searctime">
			<ul>
				<li {yun:}if $smarty.get.time=='' && !$smarty.get.stime && !$smarty.get.etime{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_statis">全部</a></li>
				<li {yun:}if $smarty.get.time==-1{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_statis&time=-1">今天</a></li>
				<li {yun:}if $smarty.get.time==1{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_statis&time=1">昨天</a></li>
				<li {yun:}if $smarty.get.time==7{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_statis&time=7">7天内</a></li>
				<li {yun:}if $smarty.get.time==30{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_statis&time=30">30天内</a></li>
				<li {yun:}if $smarty.get.time==90{/yun}class='curr'{yun:}/if{/yun}><a href="index.php?m=crm_statis&time=90">90天内</a></li>
				<li {yun:}if $smarty.get.stime || $smarty.get.etime {/yun}class='curr'{yun:}/if{/yun}><a href="javascript:void(0);" onclick='searchForm();'>自定义</a></li>
			</ul>
		</div>
		
		<div class="clear"></div> 
		
		<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
		<form  class="layui-form" action="index.php"  target="supportiframe" name="myform" method="get" id='myform'>
			
			<input name="m" value="user_member" type="hidden"/>
			<input name="c" value="del" type="hidden"/>
			
			<div class="crm_newly_build_tit" style="padding:10px 0 0 0 ">
				<div class="layui-input-inline">
					<select name="uid" id="uid" lay-filter='uid'>
						<option value="" {yun:}if !$smarty.get.uid{/yun}selected{yun:}/if{/yun} data-url="{yun:}searchurl m=$smarty.get.m c=$smarty.get.c adv='' adt='uid' untype='uid'{/yun}">全部</option>
						{yun:}foreach item=v from=$auser{/yun}
						<option value="{yun:}$v.uid{/yun}" {yun:}if $smarty.get.uid ==$v.uid{/yun}selected{yun:}/if{/yun} data-url="{yun:}searchurl m=$smarty.get.m c=$smarty.get.c adv=$v.uid adt='uid' untype='uid'{/yun}">{yun:}$v.name{/yun}</option>
						{yun:}/foreach{/yun}
					</select>
				</div>
			</div>
			
			<div class="table-list" style="margin-top:10px;">
				<div class="admin_table_border">
					<table width="100%" >
						<thead>
							<tr class="admin_table_top">
								<th align="center">姓名/用户名</th>
								<th align="left">客户总数</th>
								<th align="left">待跟进客户</th>
								<th align="left">已跟进客户</th>
								<th align="left">待回访客户</th>
								<th align="left">签单数</th>
								<th align="left">签单金额（元）</th>
								<th class="admin_table_th_bg">业务详情</th>
							</tr>
						</thead>

						<tbody>
							{yun:}foreach item=v key=key from=$userrows{/yun}
								<tr {yun:}if ($key+1)%2 == 0{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.uid{/yun}">
									<td align="center">
										{yun:}$v.name{/yun}
										<div class="mt5">{yun:}$v.username{/yun}</div>
									</td>
									<td align="left">{yun:}$v.concernNum+$v.concernedNum{/yun}</td>
									<td align="left">{yun:}$v.concernNum{/yun}</td>
									<td align="left">{yun:}$v.concernedNum{/yun}</td>
									<td align="left">{yun:}$v.returnVisitNum{/yun}</td>
									<td align="left">{yun:}$v.orderNum{/yun}</td>
									<td align="left">{yun:}$v.orderPrice{/yun}</td>
									<td width="120">
										<div class="admin_new_bth_c">
											<a href="index.php?m=crm_statis&c=performance&uid={yun:}$v.uid{/yun}" class="crm_submit_rw " >查看详情</a>
										</div>
									</td>
								</tr>
							{yun:}/foreach{/yun}

							{yun:}if $total > $config.sy_listnum {/yun}
								<tr>
									{yun:}if $pagenum==1{/yun}
										<td colspan="3"> 从 1 到 {yun:}$config.sy_listnum {/yun} ，总共 {yun:}$total{/yun} 条</td>
									{yun:}else if $pagenum > 1 && $pagenum < $pages{/yun}
										<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ，总共 {yun:}$total{/yun} 条</td>
									{yun:}else if $pagenum == $pages{/yun}
										<td colspan="3"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ，总共 {yun:}$total{/yun} 条</td>
									{yun:}/if{/yun}
									<td colspan="10" class="digg">{yun:}$pagenav{/yun}</td>
								</tr>
							{yun:}/if{/yun}
						</tbody>
					</table>

					<input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
				</div>
			</div>
		</form>
	</div>
	
	<form action='index.php' method='get' class='layui-form' style='display:none;' id="search_form"  autocomplete='off'>
				
		<input type="hidden" name="m" value="crm_statis" />
		
		<div class="crm_record_list">
			<div class="crm_record_name"><span class="admin_required_icon"></span>起始日期：</div>
			<div class="crm_record_textbox">
				<div class="layui-form-item">
					<div class="layui-inline">
						<div class="layui-input-inline">
							<input type="text" id="stime" name="stime"  class="layui-input" style="width:300px">
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="crm_record_list">
			<div class="crm_record_name"><span class="admin_required_icon"></span>结束日期：</div>
			<div class="crm_record_textbox">
				<div class="layui-form-item">
					<div class="layui-inline">
						<div class="layui-input-inline">
							<input type="text" id="etime" name="etime"  class="layui-input" style="width:300px">
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="crm_record_list" >
			<span class="crm_record_name">&nbsp;</span>
			<div class="crm_record_textbox">
				<input type="submit"  value='确认' class="admin_examine_bth">
				<input type="button"  onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消' style="margin-left:10px;">
			</div> 	
		</div>
		
	</form>
	
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
	<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
	
	<script>
	
		layui.use(['form', 'laydate'], function(){
			var laydate = layui.laydate,
				form = layui.form,
				$ = layui.$;
			
			laydate.render({
				elem : '#stime'
				,type : 'date'
			});
			
			laydate.render({
				elem : '#etime'
				,type : 'date'
			});
			
			form.on('select(uid)', function(data){
				var url=$('#uid option:selected').attr('data-url');
				location.href=url;
			});
		});
		
		function searchForm(){
			layer.open({
				type: 1, 
				anim: 5,
				title: '自定义搜索',
				content: $('#search_form'),  
				area:["450px", "280"],
				offset: ['20px', ''],
			});
		}
	</script>
	{yun:}include file="$adminstyle/checkdomain.htm"{/yun}
</body>
</html>
